package com.example.practice2023.mapper;

import com.example.practice2023.pojo.Member;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemberMapper {
    Member selectBymemberId(Integer memberId);

    void insertMember(Member member);
    void updateBymemberId(Member member);
    void deleteBymemberId(Integer memberId);

    List<Member> selectMemberByPage(@Param("index") Integer index,
                                    @Param("limit") Integer limit,
                                    @Param("memberId")Integer memberId,
                                    @Param("memberPhone")String memberPhone,
                                    @Param("memberName")String memberName,
                                    @Param("grade")String grade,
                                    @Param("memberStatus")Integer memberStatus);

    int selectAllMemberCount(@Param("memberId")Integer memberId,
                             @Param("memberPhone")String memberPhone,
                             @Param("memberName")String memberName,
                             @Param("grade")String grade,
                             @Param("memberStatus")Integer memberStatus);
    void updateSwitch(Member member);
}
